﻿/*
-----------------------------------------------------------------------------
This source file is part of Cell Cloud.

Copyright (c) 2009-2012 Cell Cloud Team - cellcloudproject@gmail.com

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-----------------------------------------------------------------------------
*/

#ifndef CellContactPacketDefinition_h
#define CellContactPacketDefinition_h

#include "CellPrerequisites.h"

// 连接服务并建立协作联系
// 包格式：
#define CPT_CONTACT {'C', 'O', 'N', 'T'}
#define CPT_CONTACT_B1 'C'
#define CPT_CONTACT_B2 'O'
#define CPT_CONTACT_B3 'N'
#define CPT_CONTACT_B4 'T'
#define CPT_CONTACT_ASSIGN(var) memcpy((var), "CONT", 4);

// 连接进行协作
#define CPT_ASSOCIATE {'A', 'S', 'S', 'C'}
#define CPT_ASSOCIATE_B1 'A'
#define CPT_ASSOCIATE_B2 'S'
#define CPT_ASSOCIATE_B3 'S'
#define CPT_ASSOCIATE_B4 'C'
#define CPT_ASSOCIATE_ASSIGN(var) memcpy((var), "ASSC", 4);

// 数据批次
#define CPT_BATCH {'B', 'A', 'T', 'C'}
#define CPT_BATCH_B1 'B'
#define CPT_BATCH_B2 'A'
#define CPT_BATCH_B3 'T'
#define CPT_BATCH_B4 'C'
#define CPT_BATCH_ASSIGN(var) memcpy((var), "BATC", 4);

#endif // CellContactPacketDefinition_h
